#include "../../include/pool/task.h"
#include "../../include/pool/result.h"
#include <string>
#include <memory>
Task::Task()
{
    result_ = nullptr;
}

void Task::exec()
{
    if (result_ != nullptr)
    {
        result_->setValue(run());
    }
}

void Task::setResult(Result *res)
{
    result_ = res;
}